#pragma once

#include "sys/typedef.h"
#include "PresentationID.h"

class PresentationContext;interface IPresentationWorkflow;interface Graphics;

delegate Delegate<void(const String& /*kind*/,IPresentationWorkflow* /*workflow*/)> PresentationWorkflowEventHandler;

interface IPresentationRuntime : public IInterface
{
	DEFINE_IID(IID_PresentationRuntime)

	event_declare(PresentationWorkflowEventHandler,WorkflowRunning);
	event_declare(PresentationWorkflowEventHandler,WorkflowRunned);

	virtual void RegisterPresentation(vclsid target,vclsid presentation) = 0;
	virtual void DisablePresentation(vclsid target) = 0;
	virtual void UnRegisterPresentation(vclsid target) = 0;

	virtual void RegisterWorkflow(const String& kind,vclsid presentationWorkflow) = 0;
	virtual void UnRegisterWorkflow(const String& kind) = 0;

	virtual void RunPresentation(Graphics* graphics,PresentationContext& context) = 0;
	virtual void RunWorkflow(IPresentationWorkflow* workflow,PresentationContext& context) = 0;

	virtual sys::ObjectPtr CreateWorkflow(const String& kind) = 0;
};

